/*
 * 4. Write a program that prints all the numbers 
 * between 1 and 1000, such that the sum of 
 * their digits is 11 (e.g. 704, 245, 191, ...). 
 */

public class Main {
    public static void main (String[] args) {
	for (int i = 1; i < 1000; i++)
	    if (i / 10 / 10 % 10 + i / 10 % 10 + i % 10	== 11)
		System.out.printf("%3d ", i);
	System.out.println();
    }
}
